# coding=utf-8
from app_admin.models.admins import Admins as Users
from flask_login import LoginManager

login_manager = LoginManager()


@login_manager.user_loader
def load_user(user_id):
    return Users.query.filter_by(user_id=user_id).first()


login_manager.login_view = "login_route.login"

# #  新鲜刷新 配置
# login_manager.refresh_view = "login_route.login"
# login_manager.needs_refresh_message = (
#     u"未来账号安全,请重新登录."
# )
# login_manager.needs_refresh_message_category = "info"
